const menus = [
  {
    name: "US_000弱密码定义可配置",
    id: "1",
    childrens: [
      {
        name: "AC-001",
        id: "1-1",
        des: "假设已设置5条弱密码规则， 如果我定义违反3条规则为弱密码， 那么校验“只满足两条校验规则”的密码明文时应返回校验失败及具体的错误信息。",
        rules: ["规则1", "规则2", "规则3"],
        code: `@Service
public class MailService {

    private final Logger log = LoggerFactory.getLogger(MailService.class);

    private static final String USER = "user";

    private static final String BASE_URL = "baseUrl";

    private final JHipsterProperties jHipsterProperties;

    private final JavaMailSender javaMailSender;

    private final MessageSource messageSource;

    private final SpringTemplateEngine templateEngine;

    public MailService(JHipsterProperties jHipsterProperties, JavaMailSender javaMailSender,
            MessageSource messageSource, SpringTemplateEngine templateEngine) {

        this.jHipsterProperties = jHipsterProperties;
        this.javaMailSender = javaMailSender;
        this.messageSource = messageSource;
        this.templateEngine = templateEngine;
    }

    @Async
    public void sendEmail(String to, String subject, String content, boolean isMultipart, boolean isHtml) {
        log.debug("Send email[multipart '{}' and html '{}'] to '{}' with subject '{}' and content={}",
            isMultipart, isHtml, to, subject, content);

        // Prepare message using a Spring helper
        MimeMessage mimeMessage = javaMailSender.createMimeMessage();
        try {
            MimeMessageHelper message = new MimeMessageHelper(mimeMessage, isMultipart, StandardCharsets.UTF_8.name());
            message.setTo(to);
            message.setFrom(jHipsterProperties.getMail().getFrom());
            message.setSubject(subject);
            message.setText(content, isHtml);
            javaMailSender.send(mimeMessage);
            log.debug("Sent email to User '{}'", to);
        } catch (Exception e) {
            if (log.isDebugEnabled()) {
                log.warn("Email could not be sent to user '{}'", to, e);
            } else {
                log.warn("Email could not be sent to user '{}': {}", to, e.getMessage());
            }
        }
    }
}
        `,
      },
      {
        name: "AC-002",
        id: "1-2",
        des: '假设我添加了校验规则"密码必须包含数字,如果我校验不包含数字的密码明文，那么校验组件将返回校验失败及具体的校验失败原因"密码必须包含至少一个数字。',
        rules: ["规则4", "规则5", "规则6"],
        code: `  import com.demo.util.MyType;
  import com.demo.util.MyInterface;

  public enum Enum {
    VAL1, VAL2, VAL3
  }

  public class Class<T, V> implements MyInterface {
    public static final MyType<T, V> member;
    
    private class InnerClass {
      public int zero() {
        return 0;
      }
    }

    @Override
    public MyType method() {
      return member;
    }

    public void method2(MyType<T, V> value) {
      method();
      value.method3();
      member = value;
    }
  }
        `,
      },
    ],
  },
  {
    name: "US_001弱密码校验规则",
    id: "2",
    childrens: [
      {
        name: "AC-001",
        id: "2-1",
        des: "假设已设置5条弱密码规则， 如果我定义违反3条规则为弱密码， 那么校验“只满足两条校验规则”的密码明文时应返回校验失败及具体的错误信息。",
        rules: ["规则1", "规则2", "规则3"],
        code: "",
      },
      {
        name: "AC-002",
        id: "2-2",
        des: "假设已设置5条弱密码规则， 如果我定义违反3条规则为弱密码， 那么校验“只满足两条校验规则”的密码明文时应返回校验失败及具体的错误信息。",
        rules: ["规则1", "规则2", "规则3"],
        code: "",
      },
    ],
  },
  {
    name: "US_002自定义规则",
    id: "3",
    childrens: [
      {
        name: "AC-001",
        id: "3-1",
        des: "假设已设置5条弱密码规则， 如果我定义违反3条规则为弱密码， 那么校验“只满足两条校验规则”的密码明文时应返回校验失败及具体的错误信息。",
        rules: ["规则1", "规则2", "规则3"],
        code: "",
      },
    ],
  },
];
export default menus;
